# SYNTAX TEST "Git Code Owners.sublime-syntax"

# This is a comment.
# Each line is a file pattern followed by one or more owners.

# These owners will be the default owners for everything in
# the repo, unless a later match takes precedence.
*       @global-owner1 @global-owner2
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners keyword.operator.path.asterisk.fnmatch.git
#^^^^^^^ - meta.path - meta.owners
#       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.owners.git.codeowners
#       ^^^^^^^^^^^^^^ meta.reference.username.git entity.name.reference.username.git
#       ^ punctuation.definition.reference.username.git
#                      ^^^^^^^^^^^^^^ meta.reference.username.git entity.name.reference.username.git
#                      ^ punctuation.definition.reference.username.git

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
*.js    @js-owner
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners keyword.operator.path.asterisk.fnmatch.git
#^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#   ^^^^ - meta.path - meta.owners
#       ^^^^^^^^^ meta.owners.git.codeowners meta.reference.username.git entity.name.reference.username.git
#       ^ punctuation.definition.reference.username.git

# You can also use email addresses if you prefer. They'll be
# used to look up users just like we do for commit author
# emails.
*.go docs@example.com
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners keyword.operator.path.asterisk.fnmatch.git
#^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#   ^ - meta.path - meta.owners
#    ^^^^^^^^^^^^^^^^ meta.owners.git.codeowners meta.reference.email.git entity.name.reference.email.git

# In this example, @doctocat owns any files in the build/logs
# directory at the root of the repository and any of its
# subdirectories.
/build/logs/ @doctocat
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners punctuation.separator.path.fnmatch.git
#^^^^^^^^^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#     ^ punctuation.separator.path.fnmatch.git
#          ^ punctuation.separator.path.fnmatch.git
#           ^ - meta.path - meta.owners
#            ^^^^^^^^^ meta.owners.git.codeowners meta.reference.username.git entity.name.reference.username.git
#            ^ punctuation.definition.reference.username.git

# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
docs/*  docs@example.com
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#^^^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#   ^ punctuation.separator.path.fnmatch.git
#    ^ keyword.operator.path.asterisk.fnmatch.git
#     ^^ - meta.path - meta.owners
#       ^^^^^^^^^^^^^^^^ meta.owners.git.codeowners meta.reference.email.git entity.name.reference.email.git

# In this example, @octocat owns any file in an apps directory
# anywhere in your repository.
apps/ @octocat
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#^^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#   ^ punctuation.separator.path.fnmatch.git
#    ^ - meta.path - meta.owners
#     ^^^^^^^^ meta.owners.git.codeowners meta.reference.username.git entity.name.reference.username.git
#     ^ punctuation.definition.reference.username.git

# In this example, @doctocat owns any file in the `/docs`
# directory in the root of your repository and any of its
# subdirectories.
/docs/ @doctocat
# <- meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners punctuation.separator.path.fnmatch.git
#^^^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners
#    ^ punctuation.separator.path.fnmatch.git
#     ^ - meta.path - meta.owners
#      ^^^^^^^^^ meta.owners.git.codeowners meta.reference.username.git entity.name.reference.username.git

-docs
# <- invalid.illegal.operator.git.codeowners

!d[oc]s
# <- invalid.illegal.operator.git.codeowners
# ^^^^ - keyword.control

\#pattern
# <- invalid.illegal.operator.git.codeowners
#^ invalid.illegal.operator.git.codeowners
# ^^^^^^^ meta.path.pattern.git.codeowners entity.name.pattern.git.codeowners